package com.csjbot.weedle_auto.app.automatic.bean

/**
 * author : chenqi.
 * e_mail : 1650699704@163.com.
 * create_time : 8/23/17.
 */

class ShowResultBean {
    private val PASS = "通过"
    private val NO_PASS = "未通过"

    fun setData(left_p: Int, right_p: Int, mid: Int, left_a: Int, right_a: Int, left: Int, right: Int) {
        this.left_p = left_p
        this.right_p = right_p
        this.mid = mid
        this.left_a = left_a
        this.right_a = right_a
        this.left = left
        this.right = right
    }


    fun getLeft_p(): String {
        return if (left_p == 1) {
            PASS
        } else NO_PASS
    }

    fun getRight_p(): String {
        return if (right_p == 1) {
            PASS
        } else NO_PASS
    }


    fun getMid(): String {
        return if (mid == 1) {
            PASS
        } else NO_PASS
    }


    fun getLeft_a(): String {
        return if (left_a == 1) {
            PASS
        } else NO_PASS
    }


    fun getRight_a(): String {
        return if (right_a == 1) {
            PASS
        } else NO_PASS
    }


    fun getLeft(): String {
        return if (left == 1) {
            PASS
        } else NO_PASS
    }


    fun getRight(): String {
        return if (right == 1) {
            PASS
        } else NO_PASS
    }

    private var left_p: Int = 0
    private var right_p: Int = 0
    private var mid: Int = 0
    private var left_a: Int = 0
    private var right_a: Int = 0
    private var left: Int = 0
    private var right: Int = 0


    override fun toString(): String {
        return "手臂左红外：" + getLeft_p() + "\r\n" +
                "手臂右红外：" + getRight_p() + "\r\n" +
                "下身左下视：" + getLeft() + "\r\n" +
                "下身右下视：" + getRight() + "\r\n" +
                "下身中下视：" + getMid() + "\r\n" +
                "下身后左下视：" + getLeft_a() + "\r\n" +
                "下身后右下视：" + getRight_a() + "\r\n"
    }


}
